package com.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Data : 2020/11/20 19:08
 * package: com.controller
 * ClassName : configController
 * 描述:
 **/
@RestController
public class configController {
	
	@Value("${spring.profiles}")
	private String springProfile;
	
	@Value("${server.port}")
	private String port;
	
	@RequestMapping("/get/config")
	public String  getConfig(){
		Map< String, String > map = new HashMap<>();
		map.put("springProfile",springProfile);
		map.put("port", port);
		return map.toString();
	}
}
